﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using KPIS.GERP.Models.Class;

namespace KPIS.GERP.Models.ICM
{
    [DataContract, Table("IcmMasPurchaseRegularMapping")]
    public class MasPurchaseRegularMapping
    {
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [DataMember, Display(Name = "RegularMapId", ResourceType = typeof(Resources.MasPurchaseRegularMappingResource))]
        public int RegularMapId { get; set; }

        [CustomRequired]
        [ForeignKey("MasPurchaseRegular")]
        [DataMember, Display(Name = "RegularId", ResourceType = typeof(Resources.MasPurchaseRegularMappingResource))]
        public int? RegularId { get; set; }

        [CustomRequired]
        [ForeignKey("MasBudgetSource")]
        [DataMember, Display(Name = "BgSourceId", ResourceType = typeof(Resources.MasPurchaseRegularMappingResource))]
        public int? BgSourceId { get; set; }

        [DataMember, Display(Name = "RecordStatus", ResourceType = typeof(Resources.MasPurchaseRegularMappingResource))]
        public string RecordStatus { get; set; }

        public int? CreatedBy { get; set; }

        public DateTime? CreatedWhen { get; set; }

        public int? UpdatedBy { get; set; }

        public DateTime? UpdatedWhen { get; set; }

        [DataMember]
        public ICM.MasPurchaseRegular MasPurchaseRegular { get; set; }

        [DataMember]
        public BGM.MasBudgetSource MasBudgetSource { get; set; }
    }
}
